/**
 * Created by Rob on 10/09/2014.
 */
public class main {
    public static void main(String[] args){
//        EasiestExerciseEver();
//        System.out.println("");
//        drawAHorizontalLine(3);
//        System.out.println("");
//        System.out.println("");
//        drawAVerticalLine(4);
//        System.out.println("");
//        drawARightTriangle(4);
//        System.out.println("");
//        IsoscelesTriangle(6);
          Diamond(6);
    }

    public static void EasiestExerciseEver(){
        System.out.println("*");
    }

    public static void drawAHorizontalLine(int n){
        for(int x = 0;x < n; x++){
            System.out.print("*");
        }
    }

    public static void drawAVerticalLine(int n){
        for(int x = 0;x < n; x++){
            System.out.println("*");
        }
    }

    public static void drawARightTriangle(int n){
        for(int x = 0;x < n; x++){
            System.out.println("");
            for(int y = 0; y < x+1; y++) {
                System.out.print("*");
            }
        }
    }

    public static void IsoscelesTriangle(int n) {
        int diameter = 1;
        while(n!=0) {
            drawWhiteSpace(n);
            drawStars(diameter);
            System.out.println(" ");
            diameter += 2;
            n--;
        }
    }

    public static void drawWhiteSpace(int num){
        for (int x = 0; x < num - 1; x++) {
            System.out.print(" ");
        }
    }

    public static void drawStars(int diameter){
        for (int y = 0; y < diameter; y++) {
            System.out.print("*");
        }
    }

    public static void Diamond(int n) {
        int diameter = 1;
        int limit = n;
        while(n!=0) {
            drawWhiteSpace(n);
            drawStars(diameter);
            System.out.println(" ");
            diameter += 2;
            n--;
        }
        n++;
        diameter-=2;
        while (n!=limit){
            n++;
            diameter-=2;
            drawWhiteSpace(n);
            drawStars(diameter);
            System.out.println(" ");
        }

    }


}
